<?php

namespace Common\Service;

Class ThreadsService extends BaseService
{

    protected $pk           = '_id';
    protected $_idType      =  self::TYPE_OBJECT;
    protected $autoinc      =  false;

    protected $_validate = array(
        array('title', 'require', '标题必须', self::MUST_VALIDATE , 'regex', self::MODEL_BOTH),
        array('content', 'require', '内容必须', self::MUST_VALIDATE , 'regex', self::MODEL_BOTH),
        
    );
     
     protected $_auto = array(
        array('created_at', NOW_TIME, self::MODEL_INSERT),
        array('updated_at', NOW_TIME, self::MODEL_BOTH),
        array('is_top', 'intval', self::MODEL_BOTH, 'function'),
        array('status', 'intval', self::MODEL_BOTH, 'function'),
        array('uid', 'intval', self::MODEL_BOTH, 'function'),
        array('circle_id', 'intval', self::MODEL_BOTH, 'function'),
        array('attachment_type', 'intval', self::MODEL_BOTH, 'function'),
    ); 

}